import '@ant-design/compatible/assets/index.css';
import { Row, Col } from 'antd';
import React from 'react';
import styles from './style.less'

const DetailInfo = props => {

  const { lostArticlesDetailsD } = props;

  // 过滤遗失物品类别
  const fitlerLostCategory = (v) => {
    if (v === 1) {
      return (<span>食品、药品、保健品、香烟、酒水等入口物品，生活日用品、服装鞋帽、工艺品（含字画）、书籍等无价值物品</span>)
    } else if (v === 2) {
      return (<span>鲜活、易腐物品</span>)
    } else if (v === 3) {
      return (<span>军用品、历史文物、珍贵图书类</span>)
    } else if (v === 4) {
      return (<span>珠宝玉石、证件、银行卡等物品</span>)
    } else if (v === 5) {
      return (<span>现金、有价票据、贵金属</span>)
    } else if (v === 6) {
      return (<span>电子类、虫草类物品</span>)
    } else if (v === 7) {
      return (<span>违禁物品</span>)
    } else if (v === 8) {
      return (<span>贵重物品</span>)
    }
  }

  // 过滤交接部门
  const fitlerDeliveryDepartment = (v) => {
    if (v === 1) {
      return (<span>清洁队</span>)
    } else if (v === 2) {
      return (<span>服务室</span>)
    } else if (v === 3) {
      return (<span>行李室</span>)
    } else if (v === 4) {
      return (<span>国际客运室</span>)
    } else if (v === 5) {
      return (<span>高端客户室</span>)
    } else if (v === 6) {
      return (<span>值机室</span>)
    } else if (v === 7) {
      return (<span>客舱服务部</span>)
    }
  }

  // 过滤海关监管
  const fitlerCustomsSupervision = (v) => {
    if (v === 1) {
      return (<span>是</span>)
    } else if (v === 2) {
      return (<span>否</span>)
    }
  }

  // 过滤国内国际
  const fitlerDomesticForeign = (v) => {
    if (v === 1) {
      return (<span>国内</span>)
    } else if (v === 2) {
      return (<span>国外</span>)
    }
  }

  return (
    <div className={styles.detailInfo}>
      <Row>
        <Col span={24}>物品信息</Col>
        <Col span={8}>遗失物品类别：{fitlerLostCategory(lostArticlesDetailsD.lostCategory)}</Col>
        <Col span={8}>遗失物品名称：{lostArticlesDetailsD.lostArticlesName}</Col>
        <Col span={8}>遗失物品来源：正常遗失物品</Col>
        <Col span={8}>遗失物品特征：{lostArticlesDetailsD.lostFeature}</Col>
      </Row>
      <Row>
        <Col span={24}>航班信息</Col>
        <Col span={8}>航班号：{lostArticlesDetailsD.flightNumber}</Col>
        <Col span={8}>航班日期：{lostArticlesDetailsD.flightDate}</Col>
        <Col span={8}>录入航站三字码：{lostArticlesDetailsD.inputTerminal}</Col>
      </Row>
      <Row>
        <Col span={24}>录入信息</Col>
        <Col span={8}>交接人：{lostArticlesDetailsD.pickPeople}</Col>
        <Col span={8}>交接人部门：{fitlerDeliveryDepartment(lostArticlesDetailsD.deliveryDepartment)}</Col>
        <Col span={8}>海关监管：{fitlerCustomsSupervision(lostArticlesDetailsD.customsSupervision)}</Col>
        <Col span={8}>捡拾地点：{lostArticlesDetailsD.pickLocation}</Col>
        <Col span={8}>入库人：{lostArticlesDetailsD.putStoragePeople}</Col>
        <Col span={8}>入库时间：{lostArticlesDetailsD.putStorageTime}</Col>
        <Col span={8}>国际国内：{fitlerDomesticForeign(lostArticlesDetailsD.domesticForeign)}</Col>
        <Col span={16}>备注：{lostArticlesDetailsD.remark}</Col>
      </Row>
      {
        lostArticlesDetailsD.lostArticlesClaim && (
          <Row>
            <Col span={24}>认领信息</Col>
            <Col span={8}>领取人联系方式：{lostArticlesDetailsD.lostArticlesClaim.contact}</Col>
            <Col span={8}>领取人证件号：{lostArticlesDetailsD.lostArticlesClaim.idNumber}</Col>
            <Col span={8}>领取人名称：{lostArticlesDetailsD.lostArticlesClaim.claimPeople}</Col>
            <Col span={8}>领取时间：{lostArticlesDetailsD.lostArticlesClaim.deliveryTime}</Col>
            <Col span={8}>交付地点：{lostArticlesDetailsD.lostArticlesClaim.deliveryLocation}</Col>
            <Col span={8}>出库人：{lostArticlesDetailsD.lostArticlesClaim.outStoragePeople}</Col>
            <Col span={8}>出库时间：{lostArticlesDetailsD.lostArticlesClaim.outStorageTime}</Col>
          </Row>
        )
      }
      {
        lostArticlesDetailsD.recyclePeople && (
          <Row>
            <Col span={24}>回收信息</Col>
            <Col span={8}>回收人：{lostArticlesDetailsD.recyclePeople}</Col>
            <Col span={8}>回收时间：{lostArticlesDetailsD.recycleTime}</Col>
          </Row>
        )
      }
      {
        lostArticlesDetailsD.scrapPeople && (
          <Row>
            <Col span={24}>报废信息</Col>
            <Col span={8}>报废人：{lostArticlesDetailsD.scrapPeople}</Col>
            <Col span={8}>报废时间：{lostArticlesDetailsD.scrapTime}</Col>
          </Row>
        )
      }
      {
        lostArticlesDetailsD.operatePeople && (
          <Row>
            <Col span={24}>移交信息</Col>
            <Col span={8}>操作人：{lostArticlesDetailsD.operatePeople}</Col>
            <Col span={8}>操作时间：{lostArticlesDetailsD.handOverTime}</Col>
          </Row>
        )
      }
    </div>
  )
}

export default DetailInfo;